package com.yzf.service;

import java.util.List;

import com.yzf.dao.ContactDao;
import com.yzf.entity.Contact;

public class ContactService {
	
	ContactDao dao = new ContactDao();
	
	public List<Contact> findAll(){
		List<Contact> contactList = dao.findAll();
		return contactList;
	} 
	public List<Contact> findByProjectid(String p_id){
		
		List<Contact> contacts = dao.findByProjectId(p_id);
		return contacts;
	
	}
	public Contact findById(String id){
		Contact contact = dao.findById(id);
		return contact;
		
	}
	public void edit(Contact contact){
		dao.update(contact);
	}
	public void delete(String id){
		dao.delete(id);
	}
	
}
